public class MyRunnable implements Runnable{
    @Override
    public void run() {
        while (true) {
            System.out.println("thread!");
        }
    }

    public static void main(String[] args) {
        Thread thread = new Thread(new Runnable() {
            @Override
            public void run() {
                while (true) {
                    System.out.println("thread!");
                }
            }
        });
        thread.start();
        while (true) {
            System.out.println("main!");
        }
    }
}
